package com.ecoolex.union.pay.retailer.enums;

import com.ecoolex.framework.common.EnumInterface;

public enum DirectMailGoodsOrderAfterSalesStatus implements EnumInterface<DirectMailGoodsOrderAfterSalesStatus, Integer>{

	WAIT_AUDIT(1, "待商家处理"),
	WAIT_CUSTOMER_DELIVER(2, "等待客户发货"),
	WAIT_STORE_CONFIRM(3, "等待商家确认收货"),
    SUCCESS(10,"售后成功"),
    CLOSE(11,"售后关闭");

    private final int real;

    private final String describe;

    DirectMailGoodsOrderAfterSalesStatus(int real, String describe) {
        this.real = real;
        this.describe = describe;
    }

    @Override
    public Integer real() {
        return real;
    }

    @Override
    public String describe() {
        return describe;
    }
    
    public static Boolean canOperationRefund(int status) {
    	return WAIT_AUDIT.equal(status);
    }
    
    public static Boolean canConfirmReceipt(int status) {
    	return WAIT_STORE_CONFIRM.equal(status);
    }
    
    public static Boolean canCancelApply(int status) {
    	return WAIT_AUDIT.equal(status) || WAIT_CUSTOMER_DELIVER.equal(status);
    }
    
    public static Boolean canWriteDeliveryNo(int status) {
    	return WAIT_CUSTOMER_DELIVER.equal(status);
    }
}
